home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr13 / aurora2c.zip / AUKBD.AML < prev    next >
Text File  |  1995-04-07  |  20KB  |  484 lines

  1.  
  2. // ───────────────────────────────────────────────────────────────────
  3. // The Aurora Editor v2.0
  4. // Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
  5. //
  6. // Aurora Keyboard definitions (included by MAIN.AML)
  7. //
  8. // If you have made any changes, save this file and select 'Recompile
  9. // the Editor' from the Set menu. Exit and re-enter the editor for
  10. // your changes to take effect.
  11. // ───────────────────────────────────────────────────────────────────
  12.  
  13. // ───────────────────────────────────────────────────────────────────
  14. //  Edit and File Manager windows
  15. // ───────────────────────────────────────────────────────────────────
  16.  
  17.   object  edit_fmgr
  18.  
  19.   // Controls
  20.   function  '≡'                                // close window
  21.     close
  22.   end
  23.  
  24.   // Menu activation
  25.   key  <esc>           gotobar                 // to last menu bar item
  26.   key  <f10>           gotobar                 // to last menu bar item
  27.   key  <alt f10>       gotomenu                // goto last pull-down menu
  28.   key  <f1>            gotomenu "help"         // goto help pull-down menu
  29.   key  <alt t>         gotobar2                // to last toolbar/drive item
  30.  
  31.   // Scroll
  32.   key  <pgdn>          pagedown                // scroll down
  33.   key  <pgup>          pageup                  // scroll up
  34.   key  <ctrl home>     row (getviewtop)        // to page top
  35.   key  <ctrl end>      row (getviewbot)        // to page bottom
  36.   key  <ctrl pgup>     row 1                   // to file top
  37.   key  <ctrl pgdn>     row (getlines)          // to file bottom
  38.   key  <center>        adjustrow               // center cursor
  39.   key  <ctrl f9>       adjustrow 1             // scroll to page top
  40.   key  <ctrl f10>      adjustrow (getviewrows) // scroll to page bottom
  41.   key  <ctrl up>       rollrow -1              // scroll up one line
  42.   key  <ctrl down>     rollrow  1              // scroll down one line
  43.   key  <ctrl ->        lastpos                 // to last cursor position
  44.  
  45.   // File
  46.   key  <ctrl n>        opennew                 // new edit window
  47.   key  <alt e>         askopen                 // open prompt
  48.   key  <alt z>         openlast                // open last window
  49.   key  <alt ->         filelist                // file list
  50.   key  <alt q>         close                   // close window
  51.   key  <alt x>         closeall                // close all windows
  52.   key  <shift f1>      quickref 'qw'           // quick function reference
  53.   key  <shift f2>      quickref 'fw'           // function reference
  54.  
  55.   // Window
  56.   key  <alt w>         winlist                 // window list
  57.   key  <ctrl z>        maximize                // maximize window
  58.   key  <ctrl a>        nextwindow              // next window
  59.   key  <f12>           prevwindow              // prev window
  60.   key  <shift f3>      tile 'v'                // tile vertical
  61.   key  <shift f4>      tile 'h'                // tile horizontal
  62.   key  <shift f5>      cascade                 // cascade
  63.   key  <ctrl k><q>     close                   // close window
  64.  
  65.   // Search
  66.   key  <ctrl s>        askscan                 // file scan prompt
  67.   key  <ctrl b>        gotomark 't'            // find top of block
  68.   key  <ctrl 6>        cyclebook               // cycle through bookmarks
  69.  
  70.   // Print
  71.   key  <ctrl p>        print                   // print
  72.   key  <alt p>         print 'b'               // print block
  73.  
  74.   // Set
  75.   key  <ctrl f1>       togglemode              // toggle video mode
  76.   key  <alt f2>        recompile               // recompile the editor
  77.  
  78.   // Macro
  79.   key  <ctrl v>        askeval                 // macro command prompt
  80.   key  <alt f9>        askrun                  // DOS command prompt
  81.   key  <alt f8>        askruncap               // DOS capture prompt
  82.   key  <f9>            shell                   // exit to DOS
  83.  
  84.   // Other
  85.   key  <alt f5>        opencfg "tran"          // edit translation table
  86.  
  87.   // undefined or unnamed keys
  88.   key <otherkey> (keycode)
  89.     say (getkeyname (keycode)) + " not defined"
  90.   end
  91.  
  92.  
  93. // ───────────────────────────────────────────────────────────────────
  94. //  Prompts and Edit windows
  95. // ───────────────────────────────────────────────────────────────────
  96.  
  97.   object  prompt
  98.  
  99.   // Controls
  100.   function  '≡'                                // close window
  101.     close
  102.   end
  103.  
  104.   function  '*'                                // simulate <enter>
  105.     call <enter>                               //  (2-line box only)
  106.   end
  107.  
  108.   // Cursor
  109.   key  <left>          left                    // move cursor left
  110.                        smark                   // cua marking
  111.  
  112.   key  <right>         right                   // move cursor right
  113.                        smark                   // cua marking
  114.  
  115.   key  <home>          col 1                   // to column one
  116.                        smark                   // cua marking
  117.  
  118.   key  <end>           col  getlinelen + 1     // to end of line
  119.                        smark                   // cua marking
  120.  
  121.   // Scroll
  122.   key  <f7>            rollcol -(getviewcols - 1)   // page left
  123.   key  <f8>            rollcol   getviewcols - 1    // page right
  124.  
  125.   // Editing
  126.   key  <ins>           setting 'I' TOGGLE      // toggle insert mode
  127.   key  <del>           delchar                 // delete character
  128.  
  129.   key  <backspace>     backsp                  // delete left character
  130.   key  <f6>            delchar (getlinelen)    // erase to end of line
  131.   key  <alt f6>                                // erase to beginning of line
  132.     ovltext (copystr ' ' (getcol)) 1
  133.   end
  134.   key  <ctrl [>        literal                 // enter literal character
  135.   key  <alt =>         asciilist               // display ascii chart
  136.  
  137.   // Block
  138.   key  <alt a>         markchar                // mark character
  139.   key  <alt b>         markcolumn              // mark column
  140.   key  <alt 1>         markword                // mark word
  141.   key  <alt 2>         markeol                 // mark to end of line
  142.   key  <alt u>         destroymark             // unmark
  143.  
  144.   // copy block to prompt
  145.   key  <alt c>
  146.                        instext (getmarktext)
  147.                        col  getlinelen + 1
  148.  
  149.   // paste from clipboard to prompt
  150.   key  <grey*>
  151.                        usemark _ClipName
  152.                        instext (getmarktext)
  153.                        usemark
  154.                        col  getlinelen + 1
  155.  
  156.   // copy from prompt to clipboard
  157.   key  <grey+>         copy
  158.  
  159.   // Prompt history
  160.   key  <up>            prevhist                // retrieve prev prompt
  161.   key  <down>          nexthist                // retrieve next prompt
  162.   key  <pgup>          askhistory              // history popup menu
  163.   key  <pgdn>          askhistory              // history popup menu
  164.  
  165.   // Exit
  166.   key  <esc>           close                   // quit prompt
  167.   key  <alt q>         close                   // quit prompt
  168.  
  169.   // non-function keys
  170.   key  <char> (character)                      // typeable keys
  171.     write character
  172.   end
  173.  
  174.   // filename completion
  175.   key  <ctrl tab>      askcomplete             // filename completion
  176.   key  <tab>           askcomplete             // filename completion
  177.   end
  178.  
  179.  
  180. // ───────────────────────────────────────────────────────────────────
  181. //  Edit windows
  182. // ───────────────────────────────────────────────────────────────────
  183.  
  184.   object  edit
  185.  
  186.   // Controls
  187.   function  '≡'
  188.     close                                      // close window
  189.   end
  190.  
  191.   // Menu
  192.   key  <esc>           gotobar                 // to last menu bar item
  193.  
  194.   // Cursor
  195.   key  <up>            up                      // move cursor up
  196.                        smark                   // cua marking
  197.  
  198.   key  <down>          down                    // move cursor down
  199.                        smark                   // cua marking
  200.  
  201.   key  <enter>         enter                   // enter key
  202.   key  <greyenter>     enter                   // keypad enter key
  203.   key  <del>           delchar2                // delete character
  204.   key  <backspace>     backsp                  // delete left char
  205.   key  <ctrl t>        delword _CSet           // delete right word
  206.   key  <tab>           tabright                // tab right
  207.   key  <shift tab>     tableft                 // tab left
  208.  
  209.   key  <ctrl left>     prevword                // find left word
  210.                        smark                   // cua marking
  211.  
  212.   key  <ctrl right>    nextword                // find right word
  213.                        smark                   // cua marking
  214.  
  215.   // Scroll
  216.   key  <pgdn>          pagedown                // page down
  217.                        display
  218.                        smark
  219.  
  220.   key  <pgup>          pageup                  // page up
  221.                        display
  222.                        smark
  223.  
  224.   key  <ctrl home>     row (getviewtop)        // to page top
  225.                        smark
  226.  
  227.   key  <ctrl end>      row (getviewbot)        // to page bottom
  228.                        smark
  229.  
  230.   key  <ctrl pgup>     row 1                   // to file top
  231.                        smark
  232.  
  233.   key  <ctrl pgdn>     row (getlines)          // to file bottom
  234.                        smark
  235.  
  236.   key  <ctrl up>       rollrow -1              // scroll up one line
  237.   key  <ctrl down>     rollrow  1              // scroll down one line
  238.  
  239.   // File
  240.   key  <alt i>         askinsert               // open and insert prompt
  241.   key  <ctrl ]>        openword                // open file at cursor
  242.   key  <alt n>         askname                 // rename prompt
  243.   key  <f3>            save                    // save file
  244.   key  <ctrl del>      nextfile                // next file
  245.   key  <ctrl ins>      prevfile                // prev file
  246.   key  <f4>            open "*.*"              // display file manager
  247.   key  <alt q>         close                   // close file/window
  248.   key  <ctrl x>        close 's'               // save & close file/window
  249.  
  250.   // Window
  251.   key  <ctrl c>        copywin                 // copy window
  252.   key  <alt h>         splitwin 'h'            // split window horizontal
  253.   key  <alt v>         splitwin 'v'            // split window vertical
  254.   key  <ctrl f8>       toolbar                 // display tool bar
  255.   key  <ctrl f7>       togglestyle             // toggle window style
  256.  
  257.   // Block
  258.   key  <alt l>         markline                // mark line
  259.   key  <alt 3>         markpara "tb"           // mark paragraph
  260.   key  <alt c>         copyblock2              // copy block
  261.   key  <alt o>         copyblockover           // overlay block
  262.   key  <alt m>         moveblock2              // move block
  263.   key  <ctrl m>        moveblockover           // move block over
  264.   key  <alt d>         deleteblock2            // delete block
  265.   key  <shift f7>      shiftblock -1           // unindent block
  266.   key  <shift f8>      shiftblock  1           // indent block
  267.   key  <ctrl k><f>     fillblock2              // fill block with string
  268.   key  <alt r>         formatblock2 "kr"       // reformat block
  269.   key  <alt y>         formatblock2 "rj"       // reformat & right just block
  270.   key  <ctrl k><s>     saveblock2              // save block
  271.   key  <ctrl k><o>     sortblock2              // sort block
  272.   key  <ctrl k><u>     caseblock               // change block to uppercase
  273.   key  <shift f9>      quote                   // quote a block
  274.   key  <ctrl k><c>     justblock2 'c'          // center a block
  275.  
  276.   // Search
  277.   key  <f5>            askfind                 // find prompt
  278.   key  <ctrl f>        askfind                 // find prompt
  279.   key  <ctrl g>        askrepl                 // replace prompt
  280.   key  <ctrl i>        isearch                 // incremental search
  281.   key  <ctrl h>        askfindo                // find occurrences
  282.  
  283.   key  <ctrl l>        findlast                // do last find/replace
  284.   key  <ctrl 2>        quickbook               // set quick bookmark
  285.   key  <ctrl j>        askrow                  // go to line prompt
  286.   key  <alt 7>         search2 "f/f"           // go to next fold
  287.   key  <alt f3>        gotomatch2              // find matching char
  288.   key  <alt f7>        gotoerror               // go to compiler error
  289.  
  290.   // Fold
  291.   key  <alt 8>         foldline                // fold next line
  292.   key  <alt 9>         foldline 'u'            // unfold next line
  293.   key  <alt g>         destroyfold2            // destroy closed/open fold
  294.   key  <alt f>         foldblock2              // fold block
  295.   key  <alt \>                                 // open or close fold
  296.     if fold? then
  297.        openfold
  298.     else
  299.        closefold
  300.     end
  301.   end
  302.   key  <alt 0>         foldall 'ds'            // destroy all folds
  303.   key  <alt [>         foldall 'os'            // open all folds
  304.   key  <alt ]>         foldall 'cs'            // close all folds
  305.  
  306.   // Edit
  307.   key  <ctrl u>        undo                    // undo last change
  308.   key  <ctrl y>        redo                    // redo last change
  309.   key  <f2>            insabove                // insert line above
  310.   key  <ctrl enter>    insline2                // insert line
  311.   key  <ctrl backspace> delline                // delete line
  312.   key  <alt s>         splitline2              // split line
  313.   key  <alt j>         joinline                // join line
  314.   key  <alt 4>         insline (gettext)       // duplicate line
  315.   key  <alt 5>         swapline                // swap line
  316.   key  <alt 6>         centerline              // center line
  317.   key  <alt f1>        commentline             // comment/uncomment line
  318.   key  <ctrl k><t>     timestamp               // date/time stamp
  319.   key  <ctrl k><x>     tabfile                 // expand tabs
  320.   key  <ctrl \>        hiliteword              // highlight words
  321.  
  322.   // Clipboard
  323.   key  <grey->         cut                     // cut
  324.   key  <ctrl grey->    cut 'a'                 // cut append
  325.   key  <grey+>         copy                    // copy
  326.   key  <ctrl grey+>    copy 'a'                // copy append
  327.   key  <grey*>         paste                   // paste
  328.   key  <ctrl grey*>    paste 'o'               // paste over
  329.   key  <ctrl grey/>    clear                   // clear clipboard
  330.  
  331.   // Set
  332.   key  <ctrl w>        setting 'L' TOGGLE      // live word wrap toggle
  333.   key  <ctrl d>        setting 'D' TOGGLE      // line draw toggle
  334.   key  <alt f4>        setting 'T' TOGGLE      // text translate toggle
  335.  
  336.   // Macro
  337.   key  <shift f10>     compilemacro2 (getbufname)  // compile current file
  338.   key  <shift f11>     runmacro2 (getbufname)      // run current file
  339.   key  <shift f12>     pickmacro                   // macro picklist
  340.  
  341.   // non-function (typeable) keys
  342.   key  <char> (character)                      // typeable keys
  343.     write character
  344.   end
  345.  
  346.   // Other
  347.   key  <ctrl q><q>     askrepkey               // repeat entered keys
  348.  
  349.   // invoke a spell checker from within an edit window
  350.   // (replace 'jspell' with your favorite spell checker)
  351.   key  <f11>
  352.     save                                       // save the current file
  353.     run  "jspell " + getbufname  "ck"          // call spellchecker
  354.     reopen                                     // reopen current file
  355.   end
  356.  
  357. // ───────────────────────────────────────────────────────────────────
  358. //  File Manager windows
  359. // ───────────────────────────────────────────────────────────────────
  360.  
  361.   object  fmgr
  362.  
  363.   // Menu activation
  364.   key  <tab>           gotobar2                // to drive menu bar
  365.  
  366.   // Cursor
  367.   key  <left>          rollcol -1              // scroll left one column
  368.   key  <right>         rollcol  1              // scroll right one column
  369.   key  <home>          col 1                   // scroll to column one
  370.  
  371.   // move cursor up
  372.   key  <up>
  373.     if shiftkey? then
  374.       fmark
  375.     end
  376.     up
  377.   end
  378.  
  379.   // move cursor down
  380.   key  <down>
  381.     if shiftkey? then
  382.       fmark
  383.     end
  384.     down
  385.   end
  386.  
  387.   // file manager commands (single character command codes)
  388.   key  <char> (c)
  389.  
  390.     // toggle file mark
  391.     if c == ' ' then
  392.       fmark
  393.  
  394.     // <shift-character> commands
  395.     elseif shiftkey? then
  396.       case  locase c
  397.         when 'o'     fopen 'o'                   // open file/directory
  398.         when 'e'     fopen 'e'                   // open file/directory
  399.         when 'z'     fopen "ze"                  // open maximized
  400.         when 'b'     fopen 'b'                   // open binary file
  401.         when 'y'     fopen "be"                  // open binary in one window
  402.         when 'k'     openkey2 (getffile)         // open key macro file
  403.         when 'm'     fmove                       // move file
  404.         when 'c'     fcopy                       // copy file
  405.         when 'd'     fdelete                     // delete file
  406.         when 'n'     frename                     // rename file
  407.         when 'r'     frun 'c'                    // run program/batch file
  408.         when 'p'     fprint                      // print file
  409.         when 'a'     fattr                       // change file attributes
  410.         when 't'     ftouch                      // touch file
  411.  
  412.         // spell checker
  413.         when 's'     run "jspell " + getffile  "ck"
  414.  
  415.         // unarchive .ZIP or .LZH files
  416.         when 'u'
  417.           f = getffile
  418.           run (if? (pos ".lzh" f 'i') "lha e " "pkunzip ") + f  "ck"
  419.           reopen
  420.  
  421.         // view .ZIP or .LZH archives
  422.         when 'v'
  423.           f = getffile
  424.           runcap (if? (pos ".lzh" f 'i') "lha v " "pkunzip -v ") + f
  425.       end
  426.  
  427.     // hotkey to files
  428.     else
  429.       onhotkey c
  430.     end
  431.  
  432.   // File
  433.   key  <ctrl backspace>   fup                  // parent directory
  434.  
  435.   // Mark
  436.   key  <alt m>         fmark "ma"              // mark all files
  437.   key  <alt u>         fmark "ua"              // unmark all
  438.  
  439.   // Command
  440.   key  <enter>         fopen '1'               // open file (one only)
  441.   key  <ctrl enter>    fopen 'q'               // open file (close fmgr)
  442.   key  <del>           fdelete                 // delete file
  443.  
  444.   // Sort
  445.   key  <alt n>         fsort 'n'               // sort by name
  446.   key  <alt s>         fsort 's'               // sort by size
  447.   key  <alt d>         fsort 'd'               // sort by date/time
  448.   key  <alt o>         fsort 'o'               // no sort (DOS order)
  449.  
  450.   // Print
  451.   key  <ctrl p>        print                   // print fmgr contents
  452.   end
  453.  
  454.  
  455. // ───────────────────────────────────────────────────────────────────
  456. //  Movable/Sizable windows
  457. // ───────────────────────────────────────────────────────────────────
  458.  
  459.   object  win
  460.  
  461.   key  <ctrl f5>       sizekey                 // move/size with kbd
  462.   key  <ctrl f6>       pankey                  // pan video with kbd
  463.  
  464.   key  <alt ins>       sizewin -2 -1 -2 -1 2   // move window northwest
  465.   key  <alt del>       sizewin  2  1  2  1 2   // move window southeast
  466.   end
  467.  
  468.  
  469. // ───────────────────────────────────────────────────────────────────
  470. //  All windows
  471. // ───────────────────────────────────────────────────────────────────
  472.  
  473.   object  mon
  474.  
  475.   // key macros
  476.   key  <ctrl r>        record                  // toggle record setting
  477.   key  <ctrl e>        play                    // play scrap key macro
  478.  
  479.   // define multi-key prefixes
  480.   key  <ctrl k>        prefix <ctrl k>         // define <ctrl k> prefix
  481.   key  <ctrl o>        prefix <ctrl o>         // define <ctrl o> prefix
  482.   key  <ctrl q>        prefix <ctrl q>         // define <ctrl q> prefix
  483.  
  484.